var type_of_search = "Normal Search";
var other_type_of_search = "Advanced Search";



function toggleVisibility() {
 
	toggleSubmitPage();
	if(type_of_search == "Normal Search")
	{
		type_of_search = "Advanced Search";
		other_type_of_search ="Normal Search";
		toggleSubmitPage("./proceedAdvancedSearch" );

	}
	else
	{
		type_of_search = "Normal Search";
		other_type_of_search = "Advanced Search";
		toggleSubmitPage("./proceedNormalSearch" );
	}
	
	document.getElementById("search_mode").innerHTML="Switch to " + other_type_of_search;
	

	toggleVisibilityOf("toggleMe");
	toggleVisibilityOf("toggleMeToo");
 
}

function toggleVisibilityOf(componentID)
{	
	 document.getElementById(componentID).style.display = "";
	 
	 if(document.getElementById(componentID).style.visibility == "hidden" ) 
	  {
	  	  document.getElementById(componentID).style.visibility = "visible";
	  }
	  else
	  {
	  	 document.getElementById(componentID).style.visibility = "hidden";
	   	 ev.preventDefault();
	     return false;

	  }

}

function sposta(elem_id)
{
	var el = document.getElementById(elem_id);
	el.style.left = 10 + "px";
	el.style.top = 10 + "px";

}





function toggleSubmitPage(actionPage)
{
        
        var frm = document.getElementById('search_form') || null;
        if(frm) 
        {
	        frm.action = actionPage;
	    }
}









